Skip to content

Code style checker, agent_check, and source-hygiene CI - #254

Merged
trailcode merged 7 commits into
mainfrom
Trailcode/code-style
Sep 1, 2026
Merged

Code style checker, agent_check, and source-hygiene CI#254
trailcode merged 7 commits into
mainfrom
Trailcode/code-style

Conversation

@trailcode

@trailcode trailcode commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add scripts/code_style_check.py for docs/ezycad_code_style.md rules clang-format does not enforce (vertical rhythm / blank lines first).
  • Add scripts/agent_check.py so agents and CI run ASCII + style in one Python process. Markdown table --check runs when .md paths are given.
  • CMake: IDE glob for scripts plus ezycad_agent_check target.
  • Prefer bool ok = false; over brace-init for clang-format = alignment.
  • Apply missing blank lines in src/ and tests/ so the checker is clean.
  • Source hygiene CI runs python scripts/agent_check.py.

Closes #253

Related: #229

Test plan

  • python scripts/code_style_check.py src tests (no findings)
  • Source hygiene workflow on this PR (Windows, Python 3.13)
  • Reconfigure CMake to see ezycad_agent_check and scripts/ in the IDE
  • Note: python scripts/agent_check.py also flags existing non-ASCII in src/ if any remain (e.g. pi). align_md_tables.py --check is not in CI yet (several docs tables still unaligned).

Note

Low Risk
Changes are mostly tooling, docs, and formatting; CI still enforces ASCII only, with no runtime or security-sensitive logic changes in the application.

Overview
Introduces scripts/agent_check.py as the single post-edit entry point: 7-bit ASCII on src/ and tests/ (default), optional Markdown table alignment when .md paths are passed, and optional --style to run the new checker. scripts/code_style_check.py enforces vertical rhythm blank-line rules from docs/ezycad_code_style.md (not CI).

Source hygiene CI drops check-nonascii-src.cmd in favor of Python 3.13 + PYTHONUTF8 and python scripts/agent_check.py. CMake adds an ezycad_agent_check IDE target and surfaces the scripts in the solution.

Agent docs, local-dev, release, and the code style guide now point at agent_check.py; the guide also prefers = initialization over brace-init so clang-format can align assignments.

src/ and tests/ get widespread blank-line-only edits so the optional style checker is clean, plus a few ASCII comment fixes in tests (e.g. deg, pi).

Reviewed by Cursor Bugbot for commit 3184300. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 05196ce. Configure here.

Comment thread .github/workflows/source-hygiene.yml
Comment thread scripts/code_style_check.py
Trailcode added 3 commits August 31, 2026 17:44
@trailcode
trailcode merged commit 1520c85 into main Sep 1, 2026
4 checks passed
@trailcode
trailcode deleted the Trailcode/code-style branch September 1, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code style checker and post-edit agent_check

1 participant